﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_IPORT.Master" CodeBehind="SHIP_LD_PERFORMANCE_CONTROL_BULK.aspx.vb" Inherits="I_PORT.SHIP_LD_PERFORMANCE_CONTROL_BULK" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Control/Confirm.ascx" TagName="Confirm1" TagPrefix="Confirm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script type="text/javascript" language="javascript">
                        var _source;
    // keep track of the popup div
    var _popup;

    function showConfirm(customerid) {
        this._source = customerid;
        this._popup = $find('ModalPopupExtender3'); 
        this._popup.show();  
    }
       function okClick(){
        //  find the confirm ModalPopup and hide it
       this._popup.hide();

        __doPostBack(this._source.name,'');
        
    }
        function cancelClick(){
        //  find the confirm ModalPopup and hide it
        this._popup.hide();
    }
    function HideIndex(type){
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender2');
            
             if (type == 'S'){
            document.getElementById('ctl00_contentplaceholder1_btnLoadIndex').click();
                }
                else{
                document.getElementById('ctl00_contentplaceholder1_btnLoadIndex2').click();
                }
              mpu.hide();
             }
                function closeModalReject(type) {
           // document.getElementById('ctl00_contentplaceholder1_framePopup').src = 'about:blank';
        if (type == 'V')
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender7');
            mpu.hide();
            document.getElementById('ctl00_contentplaceholder1_btnRejectOK').click();
            }
            else
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender7');
            mpu.hide();
            }
           
        }
         function closeModalPopupTransfer(type){
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender1');
            
    if (type == 'S'){
            document.getElementById('ctl00_contentplaceholder1_btnTransferLoad').click();
     }
              mpu.hide();
    }
        function closeModalPopup(type){
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender4');
            
    if (type == 'S'){
            document.getElementById('ctl00_contentplaceholder1_btnDelayLoad').click();
     }
              mpu.hide();
    }
    function closeModalPopupRemark(type){
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender6');
            
    if (type == 'S'){
            document.getElementById('ctl00_contentplaceholder1_btnRemarkLoad').click();
     }
              mpu.hide();
    }
            function closeModal(type) {
           // document.getElementById('ctl00_contentplaceholder1_framePopup').src = 'about:blank';
            if (type == '@')
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender5');
            mpu.hide();
            document.getElementById('ctl00_contentplaceholder1_btnReLoad').click();
            }
           
        }
function checkNumber(e)
{
var keycode;

if (window.event) keycode = window.event.keyCode; // ใช้ IE อ่ะ

else if (e) keycode = e.which; // ใช้ Firefox เน่าะ

 if (((keycode > 47) && (keycode < 58))||(keycode == 190)||(keycode == 46))
 {
 return true;
 }
return false;
}
function printWindow() {
    browserVersion = parseInt(navigator.appVersion)
    if (browserVersion >= 4) window.print()
}
function clickButton(e, buttonid) {

    var evt = e ? e : window.event;
    var bt = document.getElementById(buttonid);
    if (bt) {
        if (evt.keyCode == 13) {
            bt.click();
            return false;
        }
    }
}
    </script>
    <style type="text/css">
    td.locked, th.locked {
position:relative;    
left:expression((this.parentElement.parentElement.parentElement.parentElement.scrollLeft-2)+'px');
}   
</style>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <asp:Panel ID="PanelBookingItem" runat="server">
                            <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                <tr>
                                    <td style="height: 5px;">
                                        <img src="../Image/space.gif" />
                                    </td>
                                </tr>
                                <tr>
                <td colspan="2" align="center" >
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                   <tr>
                       <td valign="top">
                          <table width="100%" border="0" cellpadding="2" cellspacing="0">
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label76" runat="server" SkinID="lbtxt" Text="Booking No. :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtBookingVPS" runat="server" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label72" runat="server" SkinID="lbtxt" Text="Product :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtProductSearch" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label67" runat="server" SkinID="lbtxt" Text="Product L/D :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlProductLD" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="L">Load</asp:ListItem>
                                       <asp:ListItem Value="D">Disch</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label68" runat="server" SkinID="lbtxt" Text="Destination :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDestinationSearch" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="I">Domestic</asp:ListItem>
                                       <asp:ListItem Value="O">Foreign</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;">&nbsp;</td>
                                <td align="left">
                                    <asp:Button ID="btnSearchVPS" runat="server" Text="ค้นหา" CssClass="ButtonStyle" />
                                </td>
                             </tr>
                          </table>
                       </td>
                       <td valign="top">
                       <table width="100%" border="0" cellpadding="2" cellspacing="0">
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label78" runat="server" SkinID="lbtxt" Text="Ship's Name :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtShipVPS" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                          <td style="width:100px;" align="right"><asp:Label ID="label69" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label70" runat="server" SkinID="lbtxt" Text="Lay Can :"></asp:Label>&nbsp;</td>
                          <td align="left"><asp:TextBox ID="txtDateSearch" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateSearch" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:Label ID="Label71" runat="server" SkinID="lbtxt" Text="TO"></asp:Label>&nbsp;<asp:TextBox ID="txtDateToSearch" runat="server" Width="80px"  onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateToSearch" runat="server"  ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtenderSearch5" runat="server" TargetControlID="txtDateSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateSearch"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSearch6" runat="server" TargetControlID="txtDateToSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateToSearch" ></asp:CalendarExtender>
                              </td>
                           </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label57" runat="server" SkinID="lbtxt" Text="Status :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlStatusVPS" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">On Processing</asp:ListItem>
                                       <asp:ListItem Value="L">Waiting For PTOB</asp:ListItem>
                                       <asp:ListItem Value="U">Waiting For PTOBDAY</asp:ListItem>
                                       <asp:ListItem Value="S">Waiting For PTOBSEC</asp:ListItem>
                                       <asp:ListItem Value="T">Waiting For PTMM Approve</asp:ListItem>
                                       <asp:ListItem Value="J">Close Job</asp:ListItem>
                                       <asp:ListItem Value="C">Cancel</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                              <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label66" runat="server" SkinID="lbtxt" Text="Plan Berth :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                  <asp:TextBox ID="txtPlanBerthFrom" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgPlanBerthFrom" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;-&nbsp;<asp:TextBox ID="txtPlanBerthTo" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgPlanBerthTo" runat="server" ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtender7" runat="server" TargetControlID="txtPlanBerthFrom" Format="dd MMM yyyy" PopupButtonID="ImgPlanBerthFrom"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSerachPlan" runat="server" TargetControlID="txtPlanBerthTo" Format="dd MMM yyyy" PopupButtonID="ImgPlanBerthTo"></asp:CalendarExtender>
                                </td>
                             </tr>
                          </table>
                       </td>
                   </tr>
                </table>
                </td>
              </tr>
                                <tr>
                                    <td colspan="2" align="right">
                                         <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                        <tr>
                          <td>&nbsp</td>
                          <td style="width:24px;"><img src="../Image/red.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label34" runat="server" SkinID="lbtxt" Text="WAITING VERIFIED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/green.png" /></td>
                          <td style="width:60px;" align="left">&nbsp<asp:Label ID="Label31" runat="server" SkinID="lbtxt" Text="RELEASED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/comment.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label32" runat="server" SkinID="lbtxt" Text="COMMENT"></asp:Label></td>
                          <td style="background-color:#A0CFEC;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="lb" runat="server" SkinID="lbtxt" Text="LOAD TO DOMESTIC"></asp:Label></td>
                          <td style="background-color:#6698FF;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label33" runat="server" SkinID="lbtxt" Text="LOAD TO FOREIGN"></asp:Label></td>
                          <td style="background-color:#52D017;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label34e" runat="server" SkinID="lbtxt" Text="DISCH FROM DOMESTIC"></asp:Label></td>
                          <td style="background-color:#347C17;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label39" runat="server" SkinID="lbtxt" Text="DISCH FROM FOREIGN"></asp:Label></td>
                          <td style="background-color:#FF0000;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label42" runat="server" SkinID="lbtxt" Text="CANCEL BOOKING"></asp:Label></td>
                        </tr>
                    </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 5px;">
                                        <img src="../Image/space.gif" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="center">
                                        <asp:Panel ID="panelGridItem" runat="server" Width="900px" ScrollBars="Horizontal">
                                                              <asp:GridView ID="gridItem" runat="server" SkinID="gridblue" DataKeyNames="Status,Booking_Code,Booking_name,Vehicle_no,Vehicle_Text,Booking_no,Date_From,Date_To,MAgent_no,MAgent_name,SAgent_no,SAgent_name,MKT_Product,MKT_Custom,MKT_Finance,Booking_Date,Booking_Time,VPS_approve,MRI_approve,Marketing_approve,Vps_Acknowledge,MKT_Acknowledge,Remark_VPS,Remark_MRI,Vehicle_Destination,Vehicle_TypeBuy,Demurrage,Demurrage_Money,BunkerFO_Point,BunkerDO_Point,PORT,Confirm_Time,File_Upload,SELLER,BUYER,Product_Unit,Payin"
                                                AutoGenerateColumns="False">
                                                <PagerTemplate>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:ImageButton ID="ImgFirst" runat="server" Height="22px" ImageUrl="../Image/arrow-first.gif"
                                                                    OnCommand="Paginate" CommandArgument="First" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                                    OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                            </td>
                                                            <td valign="top">
                                                                Page
                                                                <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                                of
                                                                <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                                    OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                                    OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </PagerTemplate>
                                                <Columns>
                                                    <asp:TemplateField HeaderText="BOOKING NO." ItemStyle-Wrap="false" ItemStyle-CssClass="locked" >
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkBooking" runat="server" Text="<%# Bind('Booking_no') %>"
                                                                CommandArgument="<%# Container.DataItemIndex %>" CommandName="Edit"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="Vessel NAME" DataField="Vehicle_Text" ItemStyle-Wrap="false" ItemStyle-CssClass="locked" />
                                                    <asp:BoundField HeaderText="Status" ItemStyle-Wrap="false" />
                                                     <asp:TemplateField HeaderText="Approve" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgApprove" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="LAY CAN/LAY DAY" DataField="Date_To" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="วันเวลา/จองเข้า" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="LAY TIME" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="เอกสารรายละเอียด" DataField="File_Upload" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="COMMODITY" DataField="Product_Name" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="QUANTITY" DataField="Product_Amount" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="UNIT" DataField="Product_Unit" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="BUYER" DataField="BUYER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="SALLER" DataField="SELLER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="Status" DataField="Status_Text" Visible="false" />
                                                    <asp:TemplateField HeaderText="Product" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgProduct" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Custom" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgCustom" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Finace" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgFinance" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="DEMURRAGE" DataField="Lay_Time" />
                                                    <asp:BoundField HeaderText="TERM" DataField="Lay_Time" />
                                                    <asp:TemplateField HeaderText="VPS" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgVPS" runat="server" /><asp:Image ID="imgVPSComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MRI" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMRI" runat="server" /><asp:Image ID="imgMRIComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MKT" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMKT" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="AGENT" DataField="MAgent_name" />
                                                    <asp:BoundField HeaderText="เทียบท่า" DataField="Wharf" />
                                                    <asp:BoundField HeaderText="วันเทียบ" DataField="Date_Wharf" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeStart" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="Date_WharfEnd" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeEnd" />
                                                    <asp:TemplateField HeaderText="Confirm" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgConfrim" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="REMAIN LAYTIME" />
                                                    <asp:BoundField HeaderText="REMARK" DataField="RemarkWharf" />
                                                    <asp:TemplateField HeaderText="" ItemStyle-Width="105px">
                                                        <ItemTemplate>
                                                            <asp:Button ID="btnDetail" runat="server" Text="Detail" CssClass="ButtonStyle" CommandArgument="<%# Container.DataItemIndex %>"
                                                                CommandName="Detail"  />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <asp:Timer ID="Timer1" Interval="300000" runat="server">
                                            </asp:Timer>
                                        </asp:Panel>
                                        <asp:Label ID="lbAlert" runat="server" Text="" Font-Names="Tahoma" Style="color: Red;
                                            font-size: 16px;"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                         <asp:Panel ID="PanelShipLoading" runat="server" Visible="false">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td colspan="2">
                                        <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                          <tr>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label114" runat="server" SkinID="lbtxt" Text="Booking no. :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" colspan="5" style="width: 25%;">
                                                    <asp:Label ID="lbBooking_no" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                            </tr>
                                           <tr>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text="Vessel :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" style="width: 25%;">
                                                    <asp:Label ID="lbVessel" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text="Direction :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" style="width: 15%;">
                                                    <asp:Label ID="lbDirection" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label3" runat="server" SkinID="lbtxt" Text="Pilot No :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left">
                                                    <asp:Label ID="lbPilotNo" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label4" runat="server" SkinID="lbtxt" Text="Product :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" valign="top" style="width: 25%;">
                                                    <asp:Label ID="lbProduct" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="Label6" runat="server" SkinID="lbtxt" Text="Third party :"></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" valign="top" >
                                                    <asp:TextBox ID="txtThirdParty" runat="server" Width="250px" MaxLength="200" ></asp:TextBox>
                                                </td>
                                            </tr>
                                             <tr id="rowShifting" runat="server" visible="false">
                                                <td style="width: 15%;" align="right" valign="top">
                                                    <asp:Label ID="lbHShifting" runat="server" SkinID="lbtxt" Text=""></asp:Label>&nbsp;
                                                </td>
                                                <td align="left" colspan="5" style="width: 25%;">
                                                    <asp:Label ID="lbShifting" runat="server" SkinID="lbtxt"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr> 
                                              <td colspan="6" align="left">
                                                  <asp:Label ID="Label7cc9" runat="server" SkinID="lbtxtNoColor" ForeColor="Red" Text="กรุณาระบุข้อมูลของเวลาให้อยู่ในช่วง 00:00 - 23:00"></asp:Label>
                                              </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                 <tr>
                                    <td colspan="2" style="height: 5px;">
                                        <img src="../Image/space.gif" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="center">
                                        <table border="0" cellpadding="0" cellspacing="0" width="97%">
                                            <tr>
                                                <td style="width: 100%;">
                                                    <fieldset>
                                                        <table border="0" cellpadding="2" cellspacing="0" width="100%">
                                                            <tr>
                                                                <td align="center" style="border: 1px solid #FFFFFF; background-color: #2d9d1c;">
                                                                    <asp:Label ID="Label9" runat="server" SkinID="lbHead" Text="Description"></asp:Label>
                                                                </td>
                                                                <td align="center" style="border: 1px solid #FFFFFF; width:180px; background-color: #2d9d1c;">
                                                                    <asp:Label ID="Label5" runat="server" SkinID="lbHead" Text="Standard Time"></asp:Label>
                                                                </td>
                                                                <td align="center" style="border: 1px solid #FFFFFF; background-color: #2d9d1c;">
                                                                    <asp:Label ID="Label7" runat="server" SkinID="lbHead" Text="Actual Time"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label10" runat="server" SkinID="lbtxt" Text="Vessel arrived"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbarrived" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label11" runat="server" SkinID="lbtxt" Text="Estimate NOR"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbNOR" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label13" runat="server" SkinID="lbtxt" Text="POB"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbPOB" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label15" runat="server" SkinID="lbtxt" Text="NOR accepted"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbAccept" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label17" runat="server" SkinID="lbtxt" Text="Firstline"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbFirstling" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label12" runat="server" SkinID="lbtxt" Text="Berthed"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="lbBerthedStandardDate" runat="server" SkinID="lbtxt" Text=""></asp:Label>&nbsp;<asp:Label
                                                                        ID="lbBerthedStandard" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:Label ID="lbBerthedDate" runat="server" SkinID="lbtxt" Text=""></asp:Label>&nbsp;<asp:Label
                                                                        ID="lbBerthed" runat="server" SkinID="lbtxt" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px; border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <hr />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label77" runat="server" SkinID="lbtxt" Text="NOR Tender"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF;width: 180px; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:TextBox ID="txtNORTender" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgNORTender" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtNORTenderTime" runat="server" Width="40px"></asp:TextBox>
                                                                                             <asp:CalendarExtender ID="CalendarExtender6" runat="server" 
                                                                                                 TargetControlID="txtNORTender" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgNORTender" Enabled="True"></asp:CalendarExtender>
                                                                                            <asp:MaskedEditExtender ID="MaskedEditExtender22" runat="server" TargetControlID="txtNORTenderTime"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                     <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label23" runat="server" SkinID="lbtxt" Text="Ship To Port"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                           &nbsp;
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                      <asp:DropDownList ID="ddlWharfIn" runat="server" SkinID="ddl">
                                                                      </asp:DropDownList>
                                                                      &nbsp;<asp:Label ID="Label25" runat="server" SkinID="lbtxt" Text="Fender"></asp:Label>&nbsp;<asp:TextBox  ID="txtFenderIn" runat="server" Width="50px"></asp:TextBox>
                                                                   </td>
                                                             </tr>
                                                             <tr>
                                                                     <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label24" runat="server" SkinID="lbtxt" Text="พนักงานรับเชือก"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                           <asp:Label ID="Label46" runat="server" SkinID="lbtxt" Text="บริษัท"></asp:Label>&nbsp;<asp:TextBox ID="txtCompany" runat="server" Width="80%" ></asp:TextBox>
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                      <asp:TextBox  ID="txtEmployeeIn" runat="server" Width="50px" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label29" runat="server" SkinID="lbtxt" Text="นาย"></asp:Label>
                                                                   </td>
                                                             </tr>
                                                            <tr>
                                                                     <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label59" runat="server" SkinID="lbtxt" Text="Arrival Draft"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                           &nbsp;
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                        <asp:Label ID="Label61" runat="server" SkinID="lbtxt" Text="FOR."></asp:Label>&nbsp;<asp:TextBox
                                                                            ID="txtFOR" runat="server" Width="50px"></asp:TextBox><asp:Label ID="Label22" runat="server" SkinID="lbtxt" Text="M"></asp:Label><br />
                                                                   <asp:Label ID="Label62" runat="server" SkinID="lbtxt" Text="AFT."></asp:Label>&nbsp;<asp:TextBox
                                                                        ID="txtAFT" runat="server" Width="50px"></asp:TextBox><asp:Label ID="Label8" runat="server" SkinID="lbtxt" Text="M"></asp:Label>
                                                                   </td>
                                                             </tr>
                                                            <tr>
                                                                <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label18" runat="server" SkinID="lbtxt" Text="Initial Draft Survey"></asp:Label>
                                                                </td>
                                                                <td valign="top" align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="lbCompanyInitial" runat="server" SkinID="lbtxt" Text="บริษัท"></asp:Label>&nbsp;<asp:TextBox ID="txtInitialCompany" runat="server" Width="80%" ></asp:TextBox>
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:TextBox ID="txtInitialDateFrom" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgInitialFrom" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtInitialStart" runat="server" Width="50px"></asp:TextBox><br />
                                                                      <asp:TextBox ID="txtInitialDateTo" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgInitialTo" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox  ID="txtInitialEnd" runat="server" Width="50px"></asp:TextBox>
                                                                       
                                                                                             <asp:CalendarExtender ID="CalendarExtender2" runat="server" 
                                                                                                 TargetControlID="txtInitialDateFrom" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgInitialFrom" Enabled="True"></asp:CalendarExtender>
                                                                                           <asp:CalendarExtender ID="CalendarExtender3" runat="server" 
                                                                                                 TargetControlID="txtInitialDateTo" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgInitialTo" Enabled="True"></asp:CalendarExtender>
                                                                    <asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtInitialStart"
                                                                        Mask="99:99" MaskType="Time" AcceptNegative="Left" Enabled="True">
                                                                    </asp:MaskedEditExtender>
                                                                    <asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtInitialEnd"
                                                                        Mask="99:99" MaskType="Time" AcceptNegative="Left" Enabled="True">
                                                                    </asp:MaskedEditExtender>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px; border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <hr />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" align="center">
                                                                    <asp:GridView ID="gridProduct" SkinID="gridblueNoPageNoWidth" Width="100%" ShowHeader="false"
                                                                        runat="server" DataKeyNames="Product_no,Group_no,Product_Event,Product_Amount,Product_name,BP_Code"
                                                                        AutoGenerateColumns="False">
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <ItemTemplate>
                                                                                    <table border="0" cellpadding="2" cellspacing="0" width="100%">
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #2d9d1c;" colspan="3">
                                                                                                
                                                                                                            <asp:Label ID="Label18" runat="server" SkinID="lbHead" Text="<%# Bind('indexproduct') %>"></asp:Label>
                                                                                                        
                                                                                                            <asp:Label ID="Labelll" runat="server" SkinID="lbHead" Text="<%# Bind('Product_name') %>"></asp:Label>
                                                                                                  
                                                                                            </td>
                                                                                           
                                                                                        </tr>
                                                                                         <tr>
                                                                                            <td align="left" valign="top"  style="border: 1px solid #FFFFFF; width:130px; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label40" runat="server" SkinID="lbtxt" Text="Target Quatity"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                &nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                                <asp:Label ID="lbTargetQuatity" runat="server" SkinID="lbtxt"  Text=""></asp:Label>&nbsp;<asp:Label ID="lbUnitType" runat="server" SkinID="lbtxt" Text="MT" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label48" runat="server" SkinID="lbtxt" Text="Product Catalog."></asp:Label>
                                                                                            </td>
                                                                                            <td colspan="2" style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                                                <asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="true" SkinID="chk" RepeatDirection="Horizontal" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged" >
                                                                                                    <asp:ListItem Selected="True" Value="M">MT</asp:ListItem>
                                                                                                    <asp:ListItem Value="B">BAG</asp:ListItem>
                                                                                                    <asp:ListItem Value="T">DRUM</asp:ListItem>
                                                                                                    <asp:ListItem Value="L">LITER</asp:ListItem>
                                                                                                    <asp:ListItem Value="P">PACKAGE</asp:ListItem>
                                                                                                    <asp:ListItem Value="C">PCS</asp:ListItem>
                                                                                                    <asp:ListItem Value="R">ROLL</asp:ListItem>
                                                                                                </asp:CheckBoxList>&nbsp;
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="center" colspan="3" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:GridView ID="gridTransfer" DataKeyNames=""  runat="server" 
                                                                                                SkinID="gridblueNoPage" OnRowCommand="gridTransfer_RowCommand"
                                                                                                OnRowDataBound="gridTransfer_RowDataBound" OnDataBinding="gridTransfer_DataBinding" 
                                                                                                OnRowDeleting="gridTransfer_RowDeleting" OnRowEditing="gridTransfer_RowEditing"
                                                                                                 AutoGenerateColumns="false">
                                                                                                  <Columns>
                                                                                                       <asp:BoundField HeaderText="วันที่" DataField="minId"/>
                                                                                                       <asp:BoundField HeaderText="เวลา" />
                                                                                                       <asp:BoundField HeaderText="วันที่" DataField="maxId" />
                                                                                                       <asp:BoundField HeaderText="เวลา" />
                                                                                                       <asp:BoundField HeaderText="จำนวนเที่ยวรถ(เที่ยว)" DataField="countTruck" />
                                                                                                       <asp:BoundField HeaderText="รวม(เที่ยว)" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(MT)" DataField="productWeight" />
                                                                                                       <asp:BoundField HeaderText="รวม(MT)" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(BAG)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(BAG)" Visible="false" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(DRUM)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(DRUM)" Visible="false" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(LITER)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(LITER)" Visible="false" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(PACKAGE)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(PACKAGE)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(PCS)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(PCS)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="ปริมาณการขนถ่าย(ROLL)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="รวม(ROLL)"  Visible="false" />
                                                                                                       <asp:BoundField HeaderText="หมายเหตุ" />                                                                                                       
                                                                                                       <asp:TemplateField HeaderText="แก้ไข" ItemStyle-Width="50px">
                                                                                                       <ItemTemplate>
                                                                                                          <asp:ImageButton ID="imgedit" CommandName="Edit" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" ImageUrl="~/Image/edit-24.gif" />
                                                                                                        </ItemTemplate>
                                                                                                         </asp:TemplateField>
                                                                                                             <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px">
                                                                                                              <ItemTemplate>
                                                                                                                        <asp:ImageButton ID="imgdelete" CommandName="Delete" CommandArgument="<%# Container.DataItemIndex %>" OnClientClick="showConfirm(this); return false;"  runat="server" ImageUrl="~/Image/cancel-24.gif" />
                                                                                                              </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                  </Columns>
                                                                                                </asp:GridView>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <asp:Repeater ID="reptTruckCount" OnItemDataBound="reptTruckCount_ItemDataBound" runat="server">
                                                                                            <HeaderTemplate>
                                                                                                 <tr>
                                                                                                    <td colspan="3" style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#000; font-weight:bold">
                                                                                                        รถบรรทุกสินค้าผ่านท่า
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <tr>
                                                                                                    <td style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#848585; font-weight:bold">
                                                                                                        <%#DataBinder.Eval(Container.DataItem, "TruckType")%>
                                                                                                        
                                                                                                    </td>
                                                                                                    <td colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#848585; font-weight:bold">
                                                                                                        จำนวน <%#DataBinder.Eval(Container.DataItem, "TotalCount")%> เที่ยว
                                                                                                        <asp:HiddenField ID="sumTruckHide" runat="server" Value=<%#DataBinder.Eval(Container.DataItem, "TotalCount")%> />
                                                                                                    </td>
                                                                                                </tr>
                                                                                                
                                                                                            </ItemTemplate>
                                                                                            <FooterTemplate>
                                                                                                 <tr>
                                                                                                    <td style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#848585; font-weight:bold">
                                                                                                        รวม
                                                                                                    </td>
                                                                                                    <td colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#848585; font-weight:bold">
                                                                                                       จำนวน <asp:Label ID="sumTotalTruckLabel" runat="server"></asp:Label> เที่ยว
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td colspan="3" style="border: 1px solid #FFFFFF; background-color: #def7d2; text-align:left; font-size:12px; color:#848585; font-weight:bold">&nbsp;</td>
                                                                                                </tr>
                                                                                            </FooterTemplate>
                                                                                        </asp:Repeater>
                                                                                        <asp:Panel ID="truckPanel" runat="server" Visible="false">
                                                                                            <tr>
                                                                                            <td align="left" colspan="3" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="labelTransfer" runat="server" Text="รถบรรทุกสินค้าผ่านท่า" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               &nbsp;<asp:Label ID="label55" runat="server" Text="รถยนต์บรรทุกไม่เกิน 6 ล้อ" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="left" colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="Label75" runat="server" Text="จำนวน" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="lbTruck6" runat="server" Text="0" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="label66" runat="server" Text="เที่ยว" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                              &nbsp; <asp:Label ID="label57" runat="server" Text="รถยนต์บรรทุก 8 หรือ 10 ล้อ" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="left" colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="Label74" runat="server" Text="จำนวน" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="lbTruck810" runat="server" Text="0" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="label68" runat="server" Text="เที่ยว" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               &nbsp;<asp:Label ID="label58" runat="server" Text="รถพ่วง" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="left" colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="Label73" runat="server" Text="จำนวน" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="lbTrailer" runat="server" Text="0" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="label70" runat="server" Text="เที่ยว" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               &nbsp;<asp:Label ID="label63" runat="server" Text="รถพ่วงมากกว่า 2 axle" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="left" colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="Label69" runat="server" Text="จำนวน" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="lbTrailer2" runat="server" Text="0" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="label72" runat="server" Text="เที่ยว" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               &nbsp;<asp:Label ID="label64" runat="server" Text="รวม" SkinID="lbtxt" ></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="left" colspan="2" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                               <asp:Label ID="Label67" runat="server" Text="จำนวน" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="lbTransferSum" runat="server" Text="0" SkinID="lbtxt" ></asp:Label>&nbsp;<asp:Label ID="label71" runat="server" Text="เที่ยว" SkinID="lbtxt" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                       
                                                                                        
                                                                                        </asp:Panel>
                                                                                         <tr>
                                                                                            <td align="left" colspan="3" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Button ID="btnAddTransfer" runat="server" CssClass="ButtonStyle" Text="เพิ่มการขนถ่าย" Width="120px" OnClick="btnAddTransfer_Click" />
                                                                                                <input type="hidden" id="hdfgrid" runat="server" value="M" />
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label59" runat="server" SkinID="lbtxt" Text="Commend"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="lbStartStandardTimeDate" runat="server" SkinID="lbtxt" Text="00/00/0000"></asp:Label>&nbsp;<asp:Label ID="lbStartStandardTime" runat="server" SkinID="lbtxt" Text="00:00"></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF;background-color: #c0e9ad;">
                                                                                                <asp:Label ID="lbStartActualDate" runat="server" SkinID="lbtxt" Text="00/00/0000"></asp:Label>&nbsp;<asp:Label ID="lbStartActual" runat="server" SkinID="lbtxt" Text="00:00"></asp:Label>&nbsp;
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label60" runat="server" SkinID="lbtxt" Text="Completed"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="lbStopStandardTimeDate" runat="server" SkinID="lbtxt" Text="00/00/0000"></asp:Label>&nbsp;<asp:Label ID="lbStopStandardTime" runat="server" SkinID="lbtxt" Text="00:00"></asp:Label>&nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                                <asp:Label ID="lbStopActualDate" runat="server" SkinID="lbtxt" Text="00/00/0000"></asp:Label>&nbsp;<asp:Label ID="lbStopActual" runat="server" SkinID="lbtxt" Text="00:00"></asp:Label>&nbsp;
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label35" runat="server" SkinID="lbtxt" Text="Bill of Lading"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                &nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                                <asp:TextBox ID="txtBL" runat="server" Width="60px" onkeypress="return checkNumber(this);" AutoPostBack="true" OnTextChanged="txtBL_TextChanged" ></asp:TextBox>&nbsp;<asp:Label ID="Label41" runat="server" SkinID="lbtxt" Text="MT" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label36" runat="server" SkinID="lbtxt" Text="Draft Survey"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                &nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                                <asp:TextBox ID="txtDraftSurvey" runat="server" Width="60px" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label43" runat="server" SkinID="lbtxt" Text="MT" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label37" runat="server" SkinID="lbtxt" Text="Manifest"></asp:Label>
                                                                                            </td>
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                &nbsp;
                                                                                            </td>
                                                                                            <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                                <asp:Label ID="testLabel" runat="server"></asp:Label>
                                                                                                <asp:TextBox ID="txtManifest" runat="server" Width="60px" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label44" runat="server" SkinID="lbtxt" Text="MT" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                <asp:Label ID="Label38" runat="server" SkinID="lbtxt" Text="Truck Scale"></asp:Label>
                                                                                            </td>
                                                                                            <!--
                                                                                            <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                                &nbsp;
                                                                                            </td>
                                                                                            -->
                                                                                            <td colspan="2" align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                                            From : <asp:TextBox ID="txtTruckDateFrom" runat="server" Width="70px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="clImgFrom" runat="server" ImageUrl="~/Image/calendar.png" />   
                                                                                              <asp:CalendarExtender ID="CalendarExtender4" runat="server" 
                                                                                                 TargetControlID="txtTruckDateFrom" Format="dd/MM/yyyy" 
                                                                                          PopupButtonID="clImgFrom" Enabled="True"></asp:CalendarExtender>  
                                                                                             &nbsp;<asp:TextBox ID="txtTruckTimeFrom" runat="server" Width="40px"></asp:TextBox>
                                                                                             <asp:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="txtTruckTimeFrom"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                                                 
                                                                                            &nbsp;To : <asp:TextBox ID="txtTruckDateTo" runat="server" Width="70px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="clImgTo" runat="server" ImageUrl="~/Image/calendar.png" />    
                                                                                                <asp:CalendarExtender ID="CalendarExtender8" runat="server" 
                                                                                                 TargetControlID="txtTruckDateTo" Format="dd/MM/yyyy" 
                                                                                          PopupButtonID="clImgTo" Enabled="True"></asp:CalendarExtender>
                                                                                           &nbsp;<asp:TextBox ID="txtTruckTimeTo" runat="server" Width="40px"></asp:TextBox>
                                                                                           <asp:MaskedEditExtender ID="MaskedEditExtender6" runat="server" TargetControlID="txtTruckTimeTo"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                                           
                                                                                                <asp:Button ID="btnGetTruckScale" runat="server" Text="ดึงข้อมูล Truck Scale" OnClick="btnGetTruckScale_Click" CssClass="ButtonStyle" style="width:130px" />
                                                                                                <asp:TextBox ID="txtTruckScale" runat="server" Width="60px" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label45" runat="server" SkinID="lbtxt" Text="MT" ></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px; border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <hr />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                               <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label14" runat="server" SkinID="lbtxt" Text="Departure Draft"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                           &nbsp;
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                        <asp:Label ID="txtDepartFor" runat="server" SkinID="lbtxt" Text="FOR."></asp:Label>&nbsp;<asp:TextBox
                                                                            ID="txtFOR_Out" runat="server" Width="50px"></asp:TextBox><asp:Label ID="Label16" runat="server" SkinID="lbtxt" Text="M"></asp:Label><br />
                                                                   <asp:Label ID="Label19" runat="server" SkinID="lbtxt" Text="AFT."></asp:Label>&nbsp;<asp:TextBox
                                                                        ID="txtAFT_Out" runat="server" Width="50px"></asp:TextBox><asp:Label ID="Label20" runat="server" SkinID="lbtxt" Text="M"></asp:Label>
                                                                   </td>
                                                             </tr>
                                                            <tr>
                                                                <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label21" runat="server" SkinID="lbtxt" Text="Final Draft Survey"></asp:Label>
                                                                </td>
                                                                <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    <asp:Label ID="Label56" runat="server" SkinID="lbtxt" Visible="false" Text="บริษัท"></asp:Label>&nbsp;<asp:TextBox ID="txtFinalCompany" Visible="false" runat="server" Width="80%" ></asp:TextBox>
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                     <asp:TextBox ID="txtFinalDateFrom" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgFinalFrom" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtFinalStart" runat="server" Width="50px"></asp:TextBox><br />
                                                                      <asp:TextBox ID="txtFinalDateTo" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgFinalTo" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox  ID="txtFinalEnd" runat="server" Width="50px"></asp:TextBox>
                                                                       
                                                                                             <asp:CalendarExtender ID="CalendarExtender4" runat="server" 
                                                                                                 TargetControlID="txtFinalDateFrom" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgFinalFrom" Enabled="True"></asp:CalendarExtender>
                                                                                           <asp:CalendarExtender ID="CalendarExtender5" runat="server" 
                                                                                                 TargetControlID="txtFinalDateTo" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgFinalTo" Enabled="True"></asp:CalendarExtender>
                                                                    <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFinalStart"
                                                                        Mask="99:99" MaskType="Time" AcceptNegative="Left" Enabled="True">
                                                                    </asp:MaskedEditExtender>
                                                                    <asp:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="txtFinalEnd"
                                                                        Mask="99:99" MaskType="Time" AcceptNegative="Left" Enabled="True">
                                                                    </asp:MaskedEditExtender>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                     <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label26" runat="server" SkinID="lbtxt" Text="Ship From the Port"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                           &nbsp;
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                      <asp:DropDownList ID="ddlWharfOut" runat="server" SkinID="ddl">
                                                                      </asp:DropDownList>
                                                                      &nbsp;<asp:Label ID="Label27" runat="server" SkinID="lbtxt" Text="Fender"></asp:Label>&nbsp;<asp:TextBox  ID="txtFenderOut" runat="server" Width="50px"></asp:TextBox>
                                                                   </td>
                                                             </tr>
                                                             <tr>
                                                                     <td align="left" valign="top" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                        <asp:Label ID="Label28" runat="server" SkinID="lbtxt" Text="พนักงานรับเชือก"></asp:Label>
                                                                    </td>
                                                                    <td style="border: 1px solid #FFFFFF; width: 180px; background-color: #def7d2;">
                                                                           &nbsp;
                                                                    </td>
                                                                  <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                      <asp:TextBox  ID="txtEmployeeOut" runat="server" Width="50px" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label30" runat="server" SkinID="lbtxt" Text="นาย"></asp:Label>
                                                                   </td>
                                                             </tr>
                                                             <tr>
                                                                <td  align="left" style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                                <asp:Label ID="Label51" runat="server" SkinID="lbtxt" Text="Departed"></asp:Label>
                                                                </td>
                                                                <td style="border: 1px solid #FFFFFF; background-color: #def7d2;">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="right" style="border: 1px solid #FFFFFF; background-color: #c0e9ad;">
                                                                    <asp:TextBox ID="txtDepartActualDate" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="imgDepartActualDate" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtDepartAutualTime" runat="server" Width="40px"></asp:TextBox>
                                                                                             <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
                                                                                                 TargetControlID="txtDepartActualDate" Format="dd/MM/yy" 
                                                                                          PopupButtonID="imgDepartActualDate" Enabled="True"></asp:CalendarExtender>
                                                                                            <asp:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="txtDepartAutualTime"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                </td>
                                                            </tr>
                                                             <tr>
                                                                <td colspan="3" align="center">
                                                                    <fieldset style="width: 98%;"><legend style="color: #848585; font-family: Tahoma; font-size: 14px; font-weight: bold;">Service</legend>
                                                                       <table width="95%" border="0" cellpadding="0" cellspacing="0">
                                                                       <tr>
                                                                                <td colspan="2" style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                          <tr>
                                                                             <td style="border: 1px solid #FFFFFF;width:150px;" align="right"><asp:Label ID="Label47" runat="server" SkinID="lbtxt" Text="Water :" ></asp:Label>&nbsp;</td>
                                                                             <td align="left" style="border: 1px solid #FFFFFF;" ><asp:TextBox ID="txtWater" runat="server" Width="60px" Text="0" MaxLength="10" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="lbWater" runat="server" SkinID="lbtxt" Text="MT." ></asp:Label></td>
                                                                          </tr>
                                                                          <tr>
                                                                             <td style="border: 1px solid #FFFFFF;width:150px;" align="right"><asp:Label ID="Label50" runat="server" SkinID="lbtxt" Text="Electricity :" ></asp:Label>&nbsp;</td>
                                                                             <td align="left" style="border: 1px solid #FFFFFF;"><asp:TextBox ID="txtElectricity" runat="server" Width="60px" Text="0" MaxLength="10" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="Label49" runat="server" SkinID="lbtxt" Text="KWH" ></asp:Label></td>
                                                                          </tr>
                                                                          <tr>
                                                                             <td style="border: 1px solid #FFFFFF;width:150px;" align="right"><asp:Label ID="Label52" runat="server" SkinID="lbtxt" Text="HOPPER :" ></asp:Label>&nbsp;</td>
                                                                             <td align="left" style="border: 1px solid #FFFFFF;"><asp:TextBox ID="txtHopper" runat="server" Width="60px" Text="0" MaxLength="10" onkeypress="return checkNumber(this);" ></asp:TextBox>&nbsp;<asp:Label ID="lbPC_" runat="server" SkinID="lbtxt" Text="PC" ></asp:Label>&nbsp;<asp:TextBox ID="txtHopperDateFrom" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgHopperDateFrom" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:Label ID="Label53" runat="server" SkinID="lbtxt" Text="FROM" ></asp:Label>&nbsp;<asp:TextBox ID="txtHopperFrom" runat="server" Width="60px" Text="0" MaxLength="10"  ></asp:TextBox>&nbsp;<asp:Label ID="Label54" runat="server" SkinID="lbtxt" Text="TO" ></asp:Label>&nbsp;<asp:TextBox ID="txtHopperDateTo" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgHopperDateTo" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:TextBox ID="txtHopperTo" runat="server" Width="60px" Text="0" MaxLength="10"  ></asp:TextBox>
                                                                              
                                                                                             <asp:CalendarExtender ID="CalendarExtenderHopperFrom" runat="server" 
                                                                                                 TargetControlID="txtHopperDateFrom" Format="dd/MM/yy" 
                                                                                          PopupButtonID="ImgHopperDateFrom" Enabled="True"></asp:CalendarExtender>
                                                                                          <asp:CalendarExtender ID="CalendarExtenderHopperTo" runat="server" 
                                                                                                 TargetControlID="txtHopperDateTo" Format="dd/MM/yy" 
                                                                                          PopupButtonID="ImgHopperDateTo" Enabled="True"></asp:CalendarExtender>
                                                                              <asp:MaskedEditExtender ID="MaskedEditExtenderHopperfrom" runat="server" TargetControlID="txtHopperFrom"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                               <asp:MaskedEditExtender ID="MaskedEditExtenderHopperto" runat="server" TargetControlID="txtHopperTo"
                                                                                                 Mask="99:99" MaskType="Time" AcceptNegative="Left" ></asp:MaskedEditExtender>
                                                                             </td>
                                                                          </tr>
                                                                          <tr>
                                                                                <td colspan="2" style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                       </table>
                                                                    </fieldset>
                                                                </td>
                                                             </tr>
                                                             <tr>
                                                                <td colspan="3" align="center">
                                                                    <fieldset style="width: 98%;"><legend style="color: #848585; font-family: Tahoma; font-size: 14px; font-weight: bold;">Tug Boat</legend>
                                                                       <table width="95%" border="0" cellpadding="0" cellspacing="0">
                                                                       <tr>
                                                                                <td colspan="2" style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                          <tr>
                                                                             <td style="border: 1px solid #FFFFFF;width:80px; background-color: #2d9d1c;" align="left"><asp:Label ID="lbTugBeforeHead" runat="server" SkinID="lbHead" Text="Before" ></asp:Label></td>
                                                                             <td align="center" style="border: 1px solid #FFFFFF;background-color: #def7d2;" ><asp:Label id="lbTugBefore" runat="server" SkinID="lbtxt" Text=" " ></asp:Label>&nbsp;</td>
                                                                             <%--<td style="border: 1px solid #FFFFFF;width:50px; background-color: #def7d2;"><asp:ImageButton ID="imgBefore" OnClientClick="showDelayEdit('1');" runat="server" ImageUrl="~/Image/edit-24.gif" /></td>--%>
                                                                          </tr>
                                                                          <tr>
                                                                             <td style="border: 1px solid #FFFFFF;width:80px; background-color: #2d9d1c;" align="left"><asp:Label ID="Label65" runat="server" SkinID="lbHead" Text="After" ></asp:Label></td>
                                                                             <td align="center" style="border: 1px solid #FFFFFF;background-color: #def7d2;" ><asp:Label id="lbTugAfter" runat="server" SkinID="lbtxt" Text=" " ></asp:Label>&nbsp;</td>
                                                                             <%--<td style="border: 1px solid #FFFFFF;width:50px; background-color: #def7d2;"><asp:ImageButton ID="imgAfter" OnClientClick="showDelayEdit('1');" runat="server" ImageUrl="~/Image/edit-24.gif" /></td>--%>
                                                                          </tr>
                                                                          <tr>
                                                                                <td colspan="2" style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                       </table>
                                                                    </fieldset>
                                                                </td>
                                                             </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px;">
                                                                     <fieldset style="width: 98%;">
                                                                        <legend style="color: #848585; font-family: Tahoma; font-size: 14px; font-weight: bold;">
                                                                            Delay</legend>
                                                                    <asp:UpdatePanel ID="PanelDelay" runat="server" UpdateMode="Conditional">
                                                                        <ContentTemplate>
                                                                            <table width="95%" border="0" cellpadding="2" cellspacing="0">
                                                                            <tr>
                                                                                <td style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                                <tr>
                                                                                    <td>
                                                                                        <asp:GridView ID="gridDelay" runat="server" SkinID="gridblueNoPage" DataKeyNames=""
                                                                                            AutoGenerateColumns="False">
                                                                                            <Columns>
                                                                                                <asp:BoundField HeaderText="Delay Time" DataField="Delay_DateTime" />
                                                                                                <asp:BoundField HeaderText="Cause of Delay" DataField="Cause_Delay" ItemStyle-HorizontalAlign="Center" />
                                                                                                <asp:BoundField HeaderText="Delay" DataField="Delay_Time" ItemStyle-HorizontalAlign="Center"
                                                                                                    ItemStyle-Width="50px" />
                                                                                                <asp:TemplateField HeaderText="แก้ไข" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                                                                                    <ItemTemplate>
                                                                                                        <asp:ImageButton ID="imgedit" CommandName="cmdedit" CommandArgument="<%# Container.DataItemIndex %>"   
                                                                                                            runat="server" ImageUrl="~/Image/edit-24.gif" />
                                                                                                    </ItemTemplate>
                                                                                                </asp:TemplateField>
                                                                                                <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                                                                                    <ItemTemplate>
                                                                                                        <asp:ImageButton ID="imgdelete" CommandName="cmddelete" CommandArgument="<%# Container.DataItemIndex %>"
                                                                                                            OnClientClick="showConfirm(this); return false;" runat="server" ImageUrl="~/Image/cancel-24.gif" />
                                                                                                    </ItemTemplate>
                                                                                                </asp:TemplateField>
                                                                                            </Columns>
                                                                                        </asp:GridView>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                  <td align="left">
                                                                                      &nbsp;<asp:Button ID="btnDelay" runat="server" Text="Add Cause of Delay"   CssClass="ButtonStyle" Width="150px" />
                                                                                  </td>
                                                                                </tr>
                                                                                <tr>
                                                                                <td style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                            </table>
                                                                        </ContentTemplate>
                                                                    </asp:UpdatePanel>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px;">
                                                                     <fieldset style="width: 98%;">
                                                                        <legend style="color: #848585; font-family: Tahoma; font-size: 14px; font-weight: bold;">
                                                                            Remark</legend>
                                                                    <asp:UpdatePanel ID="UpdatePanelRemark" runat="server" UpdateMode="Conditional">
                                                                        <ContentTemplate>
                                                                            <table width="95%" border="0" cellpadding="2" cellspacing="0">
                                                                            <tr>
                                                                                <td style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                                <tr>
                                                                                    <td>
                                                                                        <asp:GridView ID="gridRemark" runat="server" SkinID="gridblueNoPage" DataKeyNames=""
                                                                                            AutoGenerateColumns="False">
                                                                                            <Columns>
                                                                                                <asp:BoundField HeaderText="Remark" DataField="Remark" />
                                                                                                <asp:TemplateField HeaderText="แก้ไข" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                                                                                    <ItemTemplate>
                                                                                                        <asp:ImageButton ID="imgedit" CommandName="cmdedit" CommandArgument="<%# Container.DataItemIndex %>"  
                                                                                                            runat="server" ImageUrl="~/Image/edit-24.gif" />
                                                                                                    </ItemTemplate>
                                                                                                </asp:TemplateField>
                                                                                                <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                                                                                    <ItemTemplate>
                                                                                                        <asp:ImageButton ID="imgdelete" CommandName="cmddelete" CommandArgument="<%# Container.DataItemIndex %>"
                                                                                                            OnClientClick="showConfirm(this); return false;" runat="server" ImageUrl="~/Image/cancel-24.gif" />
                                                                                                    </ItemTemplate>
                                                                                                </asp:TemplateField>
                                                                                            </Columns>
                                                                                        </asp:GridView>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                  <td align="left">
                                                                                      &nbsp;<asp:Button ID="btnRemark" runat="server" Text="Add Remark"  CssClass="ButtonStyle" Width="150px" />
                                                                                  </td>
                                                                                </tr>
                                                                                <tr>
                                                                                <td style="height: 5px;">
                                                                                    <img src="../Image/space.gif" />
                                                                                </td>
                                                                            </tr>
                                                                            </table>
                                                                        </ContentTemplate>
                                                                    </asp:UpdatePanel>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                               <td colspan="3" >
                                                                  <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                                                                     <tr>
                                                                        <td style="width:50px;">&nbsp;</td>
                                                                        <td align="left">
                                                                            <asp:Literal ID="LiStatus" runat="server"></asp:Literal>
                                                                        </td>
                                                                     </tr>
                                                                  </table>
                                                               </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px;">
                                                                    <img src="../Image/space.gif" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" align="center">
                                                                    <asp:Button ID="btnSave" runat="server" CssClass="ButtonStyle" Text="Save" />
                                                                     <asp:Button ID="btnPrint" runat="server" CssClass="ButtonStyle" Text="Print" />
                                                                    <asp:Button ID="btnCancel" runat="server" CssClass="ButtonStyle" Text="Back" />
                                                                    <asp:Button ID="btnReject" runat="server" CssClass="ButtonStyle" Text="Reject" OnClientClick="return confirm('หลังจากทำการ Reject ระบบจะทำการย้อนสถานะกลับไปเริ่มต้น Input ข้อมูลใหม่!!');" />
                                                                    <asp:Button ID="btnSend" runat="server" CssClass="ButtonStyle" Width="120px" Text="Input Complete" />
                                                                    <asp:Button ID="btnCheck" runat="server" CssClass="ButtonStyle" Text="Chief Approve" />
                                                                    <asp:Button ID="btnApprove" runat="server" CssClass="ButtonStyle" Text="Approve" />
                                                                   
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="height: 5px;">
                                                                    <img src="../Image/space.gif" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                       </fieldset>
                                                     </td>
                                                   </tr>
                                                   </table>
                                               </td>
                                            </tr>
                            </table>
                        </asp:Panel>
                      </td>
                     </tr>
                   </table>
              <asp:Button ID="btnTransferTemp" runat="server" Style="display:none" />
              <asp:Button ID="btnTransferLoad" runat="server" Style="display:none" />
              <asp:Button ID="btnPopupDelayTemp" runat="server" Text="Button" Style="display: none;" />
              <asp:Button ID="btnPopupRemarkTemp" runat="server" Text="Button" Style="display: none;" />
              <asp:Button ID="btnRemarkLoad" runat="server" Text="Button" style="display:none;" />
              <asp:Button ID="btnDelayLoad" runat="server" Text="Button" style="display:none;" />
              <asp:Button ID="BtnTrigger" runat="server" Style="display:none" />
              <asp:Button ID="btnTrigger2" runat="server" style="display:none;" />
              <asp:Button ID="btnLoadIndex" runat="server" style="display:none;" />
              <asp:Button ID="btnLoadIndex2" runat="server" style="display:none;" />
                   <asp:Button ID="btnRejectOK" runat="server" style="display:none;" />
     <asp:Button ID="btnTempCancel" runat="server" Text="Button" Style="display: none;" />
               <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnTransferTemp" PopupControlID="PanelPopupTransfer">
            </asp:ModalPopupExtender>
             <asp:ModalPopupExtender ID="ModalPopupExtender3" BehaviorID="ModalPopupExtender3" runat="server" 
                                    OkControlID="ctl00_contentplaceholder1_ConfirmDelete_btnOk" 
                                    OnOkScript="okClick();" 
                                    CancelControlID="ctl00_contentplaceholder1_ConfirmDelete_btnNo"     
                                    OnCancelScript="cancelClick();" 
                                     BackgroundCssClass="Background" DropShadow="false" 
                                      PopupControlID="PanelConfirm" TargetControlID="BtnTrigger" >
        </asp:ModalPopupExtender>
        <asp:ModalPopupExtender ID="ModalPopupExtender4" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnPopupDelayTemp" PopupControlID="PanelPopupDelay">
            </asp:ModalPopupExtender>
            <asp:ModalPopupExtender ID="ModalPopupExtender6" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnPopupRemarkTemp" PopupControlID="PanelPopupRemark">
            </asp:ModalPopupExtender>
            <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnTrigger2" PopupControlID="PanelIndex">
            </asp:ModalPopupExtender>
            <asp:Button ID="btnPopupDetail" runat="server" Text="Button" style="display:none;" />
             <asp:Button ID="btnReLoad" runat="server" Text="Button" style="display:none;" />
              <asp:ModalPopupExtender ID="ModalPopupExtender5" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnPopupDetail" PopupControlID="PanelDetailPopup">
            </asp:ModalPopupExtender>
            <asp:ModalPopupExtender ID="ModalPopupExtender7" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnTempCancel" PopupControlID="PanelCancel">
            </asp:ModalPopupExtender>
                <asp:Panel ID="PanelCancel" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="CancelPopup" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
               <asp:Panel ID="PanelDetailPopup" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="IframeDetailPopup" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="PanelPopupTransfer" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="EditTransfer" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="PanelIndex" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="IframeIndex" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="PanelPopupDelay" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="EditDelay" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
             <asp:Panel ID="PanelPopupRemark" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="EditRemark" marginheight="0px" class="Style-Iframe" marginwidth="0px" ></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
                    <asp:Panel ID="PanelConfirm" runat="server" style="display:none;">
       <Confirm:Confirm1 ID="ConfirmDelete" runat="server" ></Confirm:Confirm1>
    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
</asp:Content>
